import request from '@/utils/request'

// 查询回收利用碳汇列表
export function listCarbon(query) {
  return request({
    url: '/recycling/carbon/list',
    method: 'get',
    params: query
  })
}

// 查询回收利用碳汇详细
export function getCarbon(id) {
  return request({
    url: '/recycling/carbon/' + id,
    method: 'get'
  })
}

// 新增回收利用碳汇
export function addCarbon(data) {
  return request({
    url: '/recycling/carbon',
    method: 'post',
    data: data
  })
}

// 修改回收利用碳汇
export function updateCarbon(data) {
  return request({
    url: '/recycling/carbon',
    method: 'put',
    data: data
  })
}

// 删除回收利用碳汇
export function delCarbon(id) {
  return request({
    url: '/recycling/carbon/' + id,
    method: 'delete'
  })
}

// 导出回收利用碳汇
export function exportCarbon(query) {
  return request({
    url: '/recycling/carbon/export',
    method: 'get',
    params: query
  })
}

// 保存上传数据
export function changeData(data) {
  return request({
    url: '/recycling/carbon/changeData',
    method: 'post',
    data: data
  })
}
